//
//  SectionOneButton.m
//  halfSweat
//
//  Created by 甘伟杰 on 16/5/13.
//  Copyright © 2016年 ganweijie. All rights reserved.
//  cellH = 60

#import "SectionOneButton.h"

@implementation SectionOneButton

- (void)configButtom {
    [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    self.titleLabel.font = [UIFont systemFontOfSize:14];
}
-(void)awakeFromNib {
    [self configButtom];
}



-(void)layoutSubviews{
    [super layoutSubviews];
    
    CGFloat imageH = 30;
    CGFloat imageW = 30;
    CGFloat imageX = 20;
    CGFloat imageY = (self.bounds.size.height - imageH) * 0.5;
    self.imageView.frame = CGRectMake(imageX, imageY, imageW, imageH);
    
    
    CGFloat titleX = CGRectGetMaxX(self.imageView.frame);
    CGRect rect = self.titleLabel.frame;
    rect.origin.x = titleX + 20;
    self.titleLabel.frame = rect;
}

@end
